package com.jiuqi.irs.generator.dao.pojo;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="TB_BILL"
 *     
*/
public class TbBill implements Serializable {

    /** identifier field */
    private String billId;

    /** nullable persistent field */
    private String orgCode;

    /** nullable persistent field */
    private String billNamecode;

    /** nullable persistent field */
    private String billStartnumber;

    /** nullable persistent field */
    private String billEndnumber;

    /** nullable persistent field */
    private Date billDate;

    /** nullable persistent field */
    private String isConfirmFlag;

    /** nullable persistent field */
    private String billYear;

    /** nullable persistent field */
    private String reserved1;

    /** nullable persistent field */
    private String reserved2;

    /** nullable persistent field */
    private String reserved3;

    /** full constructor */
    public TbBill(String billId, String orgCode, String billNamecode, String billStartnumber, String billEndnumber, Date billDate, String isConfirmFlag, String billYear, String reserved1, String reserved2, String reserved3) {
        this.billId = billId;
        this.orgCode = orgCode;
        this.billNamecode = billNamecode;
        this.billStartnumber = billStartnumber;
        this.billEndnumber = billEndnumber;
        this.billDate = billDate;
        this.isConfirmFlag = isConfirmFlag;
        this.billYear = billYear;
        this.reserved1 = reserved1;
        this.reserved2 = reserved2;
        this.reserved3 = reserved3;
    }

    /** default constructor */
    public TbBill() {
    }

    /** minimal constructor */
    public TbBill(String billId) {
        this.billId = billId;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="BILL_ID"
     *         
     */
    public String getBillId() {
        return this.billId;
    }

    public void setBillId(String billId) {
        this.billId = billId;
    }

    /** 
     *            @hibernate.property
     *             column="ORG_CODE"
     *             length="42"
     *         
     */
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    /** 
     *            @hibernate.property
     *             column="BILL_NAMECODE"
     *             length="5"
     *         
     */
    public String getBillNamecode() {
        return this.billNamecode;
    }

    public void setBillNamecode(String billNamecode) {
        this.billNamecode = billNamecode;
    }

    /** 
     *            @hibernate.property
     *             column="BILL_STARTNUMBER"
     *             length="20"
     *         
     */
    public String getBillStartnumber() {
        return this.billStartnumber;
    }

    public void setBillStartnumber(String billStartnumber) {
        this.billStartnumber = billStartnumber;
    }

    /** 
     *            @hibernate.property
     *             column="BILL_ENDNUMBER"
     *             length="20"
     *         
     */
    public String getBillEndnumber() {
        return this.billEndnumber;
    }

    public void setBillEndnumber(String billEndnumber) {
        this.billEndnumber = billEndnumber;
    }

    /** 
     *            @hibernate.property
     *             column="BILL_DATE"
     *             length="7"
     *         
     */
    public Date getBillDate() {
        return this.billDate;
    }

    public void setBillDate(Date billDate) {
        this.billDate = billDate;
    }

    /** 
     *            @hibernate.property
     *             column="IS_CONFIRM_FLAG"
     *             length="3"
     *         
     */
    public String getIsConfirmFlag() {
        return this.isConfirmFlag;
    }

    public void setIsConfirmFlag(String isConfirmFlag) {
        this.isConfirmFlag = isConfirmFlag;
    }

    /** 
     *            @hibernate.property
     *             column="BILL_YEAR"
     *             length="4"
     *         
     */
    public String getBillYear() {
        return this.billYear;
    }

    public void setBillYear(String billYear) {
        this.billYear = billYear;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED1"
     *             length="50"
     *         
     */
    public String getReserved1() {
        return this.reserved1;
    }

    public void setReserved1(String reserved1) {
        this.reserved1 = reserved1;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED2"
     *             length="100"
     *         
     */
    public String getReserved2() {
        return this.reserved2;
    }

    public void setReserved2(String reserved2) {
        this.reserved2 = reserved2;
    }

    /** 
     *            @hibernate.property
     *             column="RESERVED3"
     *             length="150"
     *         
     */
    public String getReserved3() {
        return this.reserved3;
    }

    public void setReserved3(String reserved3) {
        this.reserved3 = reserved3;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("billId", getBillId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof TbBill) ) return false;
        TbBill castOther = (TbBill) other;
        return new EqualsBuilder()
            .append(this.getBillId(), castOther.getBillId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getBillId())
            .toHashCode();
    }

}
